1. Field of the Invention
The present invention relates to an information processing apparatus, an information processing method and a computer program. More particularly, the present invention relates to an information processing apparatus, an information processing method and a computer program applied to a system that performs a data recording and reproducing process on a recording medium such as a hard disk with a data unit as an access unit used by one of an application and a device driver being different from a data unit used for internal management by the recording medium.
2. Description of the Related Art
Information processing apparatuses including a digital video camera and a personal computer perform an information recording process and an information reproducing process using an information recording medium such as a hard disk. When the information processing apparatus performs one of the information recording process and the information reproducing process, an application (program) generates or designates record data, outputs the record data to the information recording medium or receives reproducing data from the information recording medium.
For example, one of the application and the device driver accesses the information recording medium using logical block addressing (LBA) of 512 byte unit. If the LBA access unit of 512 bytes matches a management data unit in the hard disk drive (HDD), no problems are expected. If both units fail to match each other, the system may suffer from problems.
For example, a physical sector may include N logical sectors as an access unit within the HDD. By increasing the management unit of the HDD, a setting unit of error correction code (ECC) is enlarged in order to increase processing efficiency. With an amount of ECC data reduced, a storage area is efficient used.
In this way, the data access unit of the upper layer (including the application and the device driver) may be different from the data access of a controller in the information recording medium and the access unit in the information recording medium may be larger than the access unit of the upper layer. If an instruction to record data or reproduce data is issued from the upper layer to the information recording medium, a reading process or a recording process may be performed on an entire data area that collectively includes a designated area on the information recording medium.
When the application reads and updates data recorded on the information recording medium, the update process of the data on the application side is performed by logical sector unit. The information recording medium (for example, HDD) reads data by access unit of the medium containing the sector data to be updated, namely, by physical sector unit and temporarily stores the read data onto a memory in the information recording medium. The information recording medium updates only a data portion to be updated input via the device driver from the application and rerecords the updated data.
For example, if a read error occurs in the physical sector of the information recording medium, the logical data updated is substituted by the application and stored on a spare area as an emergency data recording area of the information recording medium. As for unupdated data contained in the same physical sector as the updated logical sector, dummy data temporarily stored on the memory of the information recording medium is directly stored on the spare area due to the read error occurring in the information recording medium. This means that the unupdated data is handled as if it were missing. The application and the device driver on the upper layer cannot detect data missing at all.
Semiconductor memories perform a garbage collection. In the garbage collection, a memory area is reserved if a recorded cluster is present in the same deleting block subsequent to a cluster as a target of writing. Japanese Unexamined Patent Application Publication No. 2003-308240 discloses a technique that arranges a variety of information on a medium so that such a garbage collection is not frequently generated. However, controlling the layout of information related to a file system such as file allocation table (FAT) on the information recording medium such as HDD is difficult in practice.